import Layout from '@/layout'

const securityRouter = {
  path: '/security',
  name: 'security',
  component: Layout,
  alwaysShow: true,
  meta: { title: '安全管理', icon: 'el-icon-lock' },
  children: [
    {
      path: 'group',
      name: 'group',
      component: () => import('@/views/permission/group'),
      meta: { title: '组织管理', icon: 'el-icon-thumb', 'pluginId': 'tools-security' }
    },
    {
      path: 'user',
      name: 'user',
      component: () => import('@/views/permission/user'),
      meta: { title: '用户管理', icon: 'el-icon-user', 'pluginId': 'tools-security' }
    },
    {
      path: 'user/detail',
      name: 'user_detail',
      hidden: true,
      component: () => import('@/views/permission/user_detail'),
      meta: { title: '用户详情', icon: 'el-icon-user', 'pluginId': 'tools-security', noCache: true }
    },
    {
      path: 'role',
      name: 'role',
      component: () => import('@/views/permission/role'),
      meta: { title: '角色管理', icon: 'el-icon-attract', 'pluginId': 'tools-security' }
    },
    {
      path: 'role/detail',
      name: 'role_detail',
      hidden: true,
      component: () => import('@/views/permission/role_detail'),
      meta: { title: '角色详情', icon: 'el-icon-attract', 'pluginId': 'tools-security', noCache: true }
    },
    {
      path: 'resource',
      name: 'resource',
      component: () => import('@/views/permission/resource'),
      meta: { title: '资源管理', icon: 'el-icon-folder-opened', 'pluginId': 'tools-security' }
    },
    {
      path: 'authview',
      name: 'authview',
      component: () => import('@/views/permission/GroupAuthView'),
      meta: { title: '权限视图', icon: 'el-icon-folder-opened', 'pluginId': 'tools-security' }
    }
  ]
}

export default securityRouter
